<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<%
String name = (String) session.getAttribute("uname");
if (name==null){response.sendRedirect("/Test_Project/login.jsp");}
%>

<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<base href=" <%=basePath%>">
    <meta charset="UTF-8">
    <title>侧边导航</title>
	
    <script src="testcase/js/jquery.min.js"></script>
	
	<!--阿里图标库-->
    <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_1632750_204xwxiwzht.css?1583918713" />
	
    <link rel="stylesheet" href="testcase/css/style.css">
    <style>
	/*表格样式*/
table {
	width: 100%;
	background: #ccc;
	margin: 10px auto;
	border-collapse: collapse;
	/*border-collapse:collapse合并内外边距
(去除表格单元格默认的2个像素内外边距*/
}
th,
td {
	height: 25px;
	line-height: 25px;
	text-align: center;
	border: 1px solid #ccc;
}
th {
	background: rgb(0, 128, 64);;
	font-weight: normal;
	color:#fff;
	height: 35px;
}
tr {
	background: #fff;
}
/* tr:hover {
	
} */
td a {
	color: #06f;
	text-decoration: none;
}
td a:hover {
	color: #06f;
	text-decoration: underline;
}
body{
margin-top:0px;
}
</style>
</head>
<body>
<div class="body_con">
    <div class="body_top">
    	<span class="body_top_1" style ="float: left; padding-left: 20px;">小七测试</span>
    	<span class="body_top_2" style ="float: right; padding-right: 20px;">
    		<a href="index1.jsp" style="color: #fff; ">首页</a>
			<a href="" style="color: #fff;">消息</a>
			<a href="person.jsp" style="color: #fff;">个人中心</a>
			<a href="invalidate.jsp" style="color: #fff;">注销</a>
			
			
		</span>
    </div>
    <div class="body_left">
        <ul class="body_left_list">
            <li>
                <label>
                    <span>测试类型</span>
                    <i class="iconfont iconxiajiantou"></i>
                    <a href="javascript:;"></a>
                </label>
                <ul class="leixing">
                    <li data-id="jiekou">
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>接口测试</span>
                            <i class="iconfont iconyoujiantou"></i>
                        </label>

                        
                    </li>
                    <li data-id="zidonghua" class="zidonghua">
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>自动化测试</span>
                            <i class="iconfont iconyoujiantou"></i>
                        </label>
                        <ul>
                            <li data-id="addcase" style="color:#fff; font-size: 15px; padding:10px 0 10px 80px; cursor: pointer;">添加用例</li>
                            <li data-id="commentcase" style="color:#fff; font-size: 15px; padding:10px 0 10px 80px; cursor: pointer;">用例详情</li>
                        </ul>
                    </li>

                </ul>
            </li>
            <li>
                <label>
                    <span>测试工具</span>
                    <i class="iconfont iconxiajiantou"></i>
                    <a href="javascript:;"></a>
                </label>
                <ul class="tool">
                    <li data-id="upload">
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>测试文件上传</span>
                            <i class="iconfont iconyoujiantou"></i>
                            
                        </label>
                        
                    </li>
                    <li data-id="caase">
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>用例报告查看</span>
                            <i class="iconfont iconyoujiantou"></i>
                        </label>
                        
                    </li>
                    <li data-id="down">
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>用例报告下载及发送邮件</span>
                            <i class="iconfont iconyoujiantou"></i>
                        </label>
                        
                    </li>
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>JSON转换器</span>
                            <i class="iconfont iconyoujiantou"></i>
                        </label>
                        
                    </li>
                </ul>
            </li>
            <li>
                <label>
                    <span>系统设置</span>
                    <i class="iconfont iconxiajiantou"></i>
                </label>
                <ul class="">
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>个人中心</span>
                            <i class="iconfont iconyoujiantou"></i>
                        </label>
                        
                    </li>
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>工作台</span>
                            <i class="iconfont iconyoujiantou"></i>
                        </label>
                        
                    </li>
                    <li>
                        <label>
                            <i class="iconfont iconYYGK"></i>
                            <span>配置</span>
                            <i class="iconfont iconyoujiantou"></i>
                        </label>
                        
                    </li>
                </ul>
            </li>
        </ul>
    </div>
    <div class="body_right" id="content">
        <p style="font-size: 50px; font-family: 华文行楷; color: rgb(0, 128, 64);">进入测试</p>
    </div>

</div>

<script src="testcase/js/script.js"></script>
<script>
	$(function(){
	    $(".zidonghua").on("click","li",function(){
	        var sId = $(this).data("id");
	        window.location.hash = sId;
	        loadInner(sId);
	    });
	
	    function loadInner(sId){
	        var sId = window.location.hash;
	        var pathn,i;
	        switch(sId){
		     	
	            case "#addcase":
	                pathn = "write.jsp";
	                i=0;
	                break;
	            case "#commentcase":
	                pathn = "/Test_Project/findServlet.do";
	                i=0;
	                break;
	                
	        }
	        $("#content").load(pathn); //加载相应的内容
	    }
	})

 $(function(){
        $(".leixing").on("click","li",function(){
            var sId = $(this).data("id");
            window.location.hash = sId;
            loadInner(sId);
        });

        function loadInner(sId){
            var sId = window.location.hash;
            var pathn,i;
            switch(sId){
                case "#jiekou":
                    pathn = "test1.html";
                    i=0;
                    break;
            }
            $("#content").load(pathn); //加载相应的内容
        }
    })

 $(function () {
                        $(".tool").on("click", "li", function () {
                            var sId = $(this).data("id");
                            window.location.hash = sId;
                            loadInner(sId);
                        });

                        function loadInner(sId) {
                            var sId = window.location.hash;
                            var pathn, i;
                            switch (sId) {
                                case "#upload":
                                    pathn = "shang.jsp";
                                    i = 0;
                                    break;
                                case "#caase":
                                    pathn = "case.html";
                                    i = 1;
                                    break;
                                case "#down":
                                    pathn = "com/test/servlet/ShowAllFilesServlet";
                                    i = 1;
                                    break;
                            }
                            $("#content").load(pathn); //加载相应的内容
                        }
                    })

</script>

</body>
</html>